<div>
  <form role="form" data-ng-search-form="">
    <input type="hidden" name="_csrf" value="{{csrf}}"/>
    <div class="form-group">
      <div class="input-group">
        <span class="input-group-addon"><i
          class="fa fa-search"/></span>
        <input class="form-control"
               data-ng-change="triggerSearch()"
               data-ng-focus="triggerSearch()"
               type="text"
               data-ng-model="searchObj.params.any"
               data-ng-model-options="modelOptions"
               aria-label="{{'search' | translate}}"
               placeholder="{{'search' | translate}}" autofocus=""/>
      </div>
    </div>

    <!--
        <div class="btn-group btn-group-xs" role="group" aria-label="...">
          <button data-ng-repeat="(key, facet) in searchResults.facet['topicCats']"
                  type="button"
                  class="btn btn-default"
                  data-ng-click="filterTopic(facet['@name'])"
                  title="{{facet['@name']}}">
            <i class="fa fa-3x fa-table gn-icon gn-icon-{{facet['@name']}}"></i>
          </button>
        </div>
    -->


    <div data-ng-show="searchResults.count >= 0 && searchResults.records.length === 0"
         class="alert alert-warning"
         data-translate="">
        {{('noRecordFoundWithResourceRegistered' + mode) | translate}}
    </div>

    <ul class="gn-searchlayer-list">
      <li class="gn-searchlayer"
          data-ng-repeat="m in searchResults.records"
          data-ng-init="md = getMetadata(m)">
        <h3>
          <a data-ng-href="#/metadata/{{md.getUuid()}}"
            title="{{'openRecord' | translate}}">
          {{md.title || md.defaultTitle}}
          </a>
        </h3>
        <div class="clearfix">
          <div class="gn-md-thumbnail pull-left">
            <img class="gn-img-thumbnail"
                  alt="{{md.title || md.defaultTitle}}"
                  data-ng-src="{{md.getThumbnails().list[0].url}}"
                  data-ng-if="md.getThumbnails().list[0].url"/>
          </div>
          <div class="pull-left">
            <ul>
                <li data-ng-repeat="link in md.relevantLinks">
                  <a data-ng-click="addToMap(link)">
                    {{link.desc || link.name}}&nbsp;
                  </a>
                  <a data-ng-click="addToMap(link)"
                     href=""
                     class="btn btn-default btn-xs">
                    <span data-translate="">addToMap</span>
                  </a>
                </li>
              </ul>
          </div>
        </div>
      </li>
    </ul>
    <div data-ng-show="searchResults.records.length > 0">
      <div class="pull-right"
            data-gn-pagination="paginationInfo"
            data-hits-values="searchObj.hitsperpageValues"></div>
    </div>
  </form>
</div>
